<template>
	<view class="main">
		<web-view :src="url"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url: ''
			}
		},
		onLoad(option) {
			if (option.type == 4) {
				this.url = 'https://h5.ecowool.com.cn/#/pages/authentication/visitor?type=' + option.type +
					'&from=' + option.from + '&id=' + option.id + '&token=' + uni.getStorageSync('token') + '&userId=' +
					uni
					.getStorageSync('user').id + '&openid=' + uni.getStorageSync('user').openid + '&scenne=' + uni
					.getStorageSync('scenne') + '&bid=' + uni.getStorageSync('bid').id + '&bname=' + uni.getStorageSync(
						'bid').name + '&role=' + uni.getStorageSync('user').role + '&wuserId=' + uni.getStorageSync('user')
					.wuserId + '&environment=' + uni.getStorageSync('environment');
				// this.url = 'http://localhost:8080/#/pages/authentication/visitor?type=' + option.type +
				// 	'&from=' + option.from + '&id=' + option.id + '&token=' + uni.getStorageSync('token') + '&userId=' +
				// 	uni
				// 	.getStorageSync('user').id + '&openid=' + uni.getStorageSync('user').openid + '&scenne=' + uni
				// 	.getStorageSync('scenne') + '&bid=' + uni.getStorageSync('bid').id + '&bname=' + uni.getStorageSync(
				// 		'bid').name + '&role=' + uni
				// 	.getStorageSync('user').role + '&wuserId=' + uni.getStorageSync('user').wuserId + '&environment=' + uni
				// 	.getStorageSync('environment');
			} else {
				this.url = 'https://h5.ecowool.com.cn/#/pages/authentication/identityAuthentication?type=' + option.type +
					'&from=' + option.from + '&id=' + option.id + '&token=' + uni.getStorageSync('token') + '&userId=' +
					uni
					.getStorageSync('user').id + '&openid=' + uni.getStorageSync('user').openid + '&scenne=' + uni
					.getStorageSync('scenne') + '&bid=' + uni.getStorageSync('bid').id + '&bname=' + uni.getStorageSync(
						'bid').name + '&role=' + uni.getStorageSync('user').role + '&wuserId=' + uni.getStorageSync('user')
					.wuserId + '&environment=' + uni.getStorageSync('environment');
				// this.url = 'http://localhost:8080/#/pages/authentication/identityAuthentication?type=' + option.type +
				// 	'&from=' + option.from + '&id=' + option.id + '&token=' + uni.getStorageSync('token') + '&userId=' +
				// 	uni
				// 	.getStorageSync('user').id + '&openid=' + uni.getStorageSync('user').openid + '&scenne=' + uni
				// 	.getStorageSync('scenne') + '&bid=' + uni.getStorageSync('bid').id + '&bname=' + uni.getStorageSync(
				// 		'bid').name + '&role=' + uni
				// 	.getStorageSync('user').role + '&wuserId=' + uni.getStorageSync('user').wuserId + '&environment=' + uni.getStorageSync('environment');
			}
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
</style>
